<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>管理员的界面</title>
    <link rel="stylesheet" th:href="@{/webutils/layui/css/layui.css}">
</head>

<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin" id="app">
    <div class="layui-header">
        <div class="layui-logo">新闻后台管理</div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-right" lay-filter="logout">
            <li class="layui-nav-item">
                <a href="javascript:;" th:text="${session.userName}">
                    <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
<!--                    <p th:text="${session.userId}"></p>-->
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="">基本资料</a></dd>
                    <dd><a href="">安全设置</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="">退了</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">新闻总览</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;">列表一</a></dd>
                        <dd><a href="javascript:;">列表二</a></dd>
                        <dd><a href="javascript:;">列表三</a></dd>
                        <dd><a href="">超链接</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">用户管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;">列表一</a></dd>
                        <dd><a href="javascript:;">列表二</a></dd>
                        <dd><a href="">超链接</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item"><a href="">个人信息</a></li>
                <li class="layui-nav-item"><a href="">意见反馈</a></li>
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">内容主体区域</div>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        © CopyRight by GaoLainan - 底部固定区域
    </div>
</div>
<script th:src="@{/webutils/layui/layui.js}"></script>
<script>
    //JavaScript代码区域
    layui.use('element', function() {
        var element = layui.element;
        element.on('nav(logout)',function (data) {
            console.log(data)
            /*$.ajax({
                type: "post",
                url: "manager/query",
                data: {
                    "id":1
                },
                contentType: "application/x-www-form-urlencoded",
                dataType: "json",
                success: function(data) {
                    console.log(data);
                }
            })*/
        })

    });
</script>
</body>
<!--导入jquery的库-->
<script src="https://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>

<script>
    $(document).ready(function() {
        console.log(sessionStorage.getItem("user"))
    })
</script>

</html>
